<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>媒体对象</title>
    <style>
        body {
            background-color:lightgreen;
        }

        @media screen and (max-width: 600px) {
            body {
                background-color:lightblue;
            }
        }
    </style>
</head>
<body>
<p>当浏览器窗口的宽度小于 600 像素时，背景颜色会变成淡蓝，否则是淡绿色。</p>


</body>
</html>
